package swtype

import "fmt"

func First() {
	fmt.Println("First start")

	defer func() {
		errorMsg := recover()
		if errorMsg != nil {
			fmt.Println("First  err:", errorMsg)
		}
		fmt.Println("First recover")
	}()

	second()

	fmt.Println("First end")
}

func second() {
	fmt.Println("Second start")
	Third()
	fmt.Println("Second end")
}

func Third() {
	fmt.Println("Third start")
	panic("Third panic")
	fmt.Println("Third end")
}
